package com.example.module_home

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.example.lib_base.BaseActivity
import com.example.module_home.adapter.CommonAdapter
import com.example.module_home.databinding.ActivitySearchBinding
@Route(path = "/home/search")
class SearchActivity : BaseActivity<ActivitySearchBinding>() {
    private val list= mutableListOf<String>()
    private val adapter by lazy{CommonAdapter<String>({R.layout.search_item to BR.search})}
    override fun initData() {

    }

    override fun initView() {
        binding.searchRec.adapter=adapter
        binding.icon.setOnClickListener {
            adapter.clear()
            var s = binding.et1.text.toString()
            list.add(s)
            adapter+=list
        }



    }

    override fun getLayoutId(): Int =R.layout.activity_search

}